#include "lib.h"

#include "tilecrdmg.h"

int32
TilesCardMgr::getDeckSize()
{
	return 32;
}

uint8
TilesCardMgr::getSuit(uint8 Card)
{
	return (uint8)(Card & 0xF0);
}

uint8
TilesCardMgr::getRank(uint8 Card)
{
	return Card;
}

uint8
TilesCardMgr::makeCard(int32 Index)
{
	ASSERT ( Index < 32 );
	return (uint8)Index;
}

void
TilesCardMgr::encode(uint8 Card, uint8* Buf, int32* Used)
{
	Buf[(*Used)++] = 'T';
	Buf[(*Used)++] = (uint8)('0' + Card);
}
